package Others.DesignPattern.StrategyPattern.Original.SimpleFactory;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DiscountCollectMoney extends CollectMoney {

    private double discount;

    @Override
    public double collectMoney(double money) {
        return money * discount;
    }
}
